package site.zhangzhuo.learn_springboot.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class SmsNotificationListener implements ApplicationListener<UserRegistrationEvent> {
    @Override
    public void onApplicationEvent(UserRegistrationEvent event) {
        System.out.println("发送短信通知，恭喜用户 " + event.getUsername() + " 注册成功！");
    }
}
